home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / mcu / macros05.arc / RAMSBR.INI < prev    next >
Text File  |  1990-05-16  |  4KB  |  110 lines

  1.  
  2. ****************************************************************************
  3. *  ramsbr.ini   1.0
  4. *  -------------------------------------------------------------
  5. *  Module Name:        RAMSBR - RAM Subroutine Initialization
  6. *  -------------------------------------------------------------
  7. *
  8. *  Description:
  9. *     This file contains the initialization code for the RAM subroutine
  10. *     area needed to support the MACROS05.MAC file.  It MUST be placed in
  11. *     the ROM data area and then copied to RAM for proper operation.
  12. *     Consult the MACROS05.MAC file for more details.
  13. *
  14. ****************************************************************************
  15. *
  16. *  Notes:
  17. *     1. Motorola reserves the right to make changes to this file.
  18. *        Although this file has been carefully reviewed and is
  19. *        believed to be reliable, Motorola does not assume any
  20. *        liability arising out of its use.  This code may be freely
  21. *        used and/or modified at no cost or obligation by the user.
  22. *     2. The latest version of this file is maintained on the Motorola
  23. *        FREEWARE Bulletin Board, 512/891-FREE (512/891-3733).  It operates
  24. *        continuously (except for maintenance) at 1200-2400 baud, 8 bits,
  25. *        no parity.  Sample test files for PASM05 are also included.
  26. *        Download the archive file, MACROS05.ARC, to get all the files.
  27. *
  28. **************************************************************************
  29. *  REVISION HISTORY   (add new changes to top):
  30. *
  31. *  05/16/90  P.S. Gilmour
  32. *    1. Original entry generated from MACROS05.MAC version 1.0.
  33. ****************************************************************************
  34.  
  35. .RAMSBR$  EQU    *           Start of RAM based subroutines!
  36. **************************************************************************
  37. **  The following RAM subroutines MUST BE INITIALIZED from ROM upon     **
  38. **  startup (from 'RAMSBR$' for 'RAMSZ$' number of bytes).  If changes  **
  39. **  are to be made to the RAM subroutines, make them in the MACROS05.MAC**
  40. **  file and then copy the source here (ROM area) and insert a '.' in   **
  41. **  front of all the labels (leading '.' will be used to denote ROM).   **
  42. **************************************************************************
  43.  
  44. *-- start of RAM subroutines --------------------------------------------*
  45. **************************************************************************
  46. *  LDAXREG = load A via XREG subr.
  47. *
  48. *  Register Usage:
  49. *     CC = reflects value loaded.
  50. *     All other registers preserved.
  51. *
  52. *  NOTE:
  53. *    1. Instruction modified code here must be located in RAM!
  54. *
  55. .LDAXREG  EQU    *
  56.           LDA    0-0+$FFFF
  57. .XREG1$   EQU    *-2         Pseudo XREG #1
  58.           RTS
  59.  
  60. **************************************************************************
  61. *  STA$X = store A via XREG subr.
  62. *
  63. *  Register Usage:
  64. *     CC = reflects value stored.
  65. *     All other registers preserved.
  66. *
  67. *  NOTE:
  68. *    1. Instruction modified code here must be located in RAM!
  69. *
  70. .STA$X    EQU    *
  71.           STA    0-0+$FFFF
  72. .XREG2$   EQU    *-2         Pseudo XREG #2
  73.           RTS
  74.  
  75. **************************************************************************
  76. *  LDAYREG = load A via YREG subr.
  77. *
  78. *  Register Usage:
  79. *     CC = reflects value loaded.
  80. *     All other registers preserved.
  81. *
  82. *  NOTE:
  83. *    1. Instruction modified code here must be located in RAM!
  84. *
  85. .LDAYREG  EQU    *
  86.           LDA    0-0+$FFFF
  87. .YREG1$   EQU    *-2         Pseudo YREG #1
  88.           RTS
  89.  
  90. **************************************************************************
  91. *  STA$Y = store A via YREG subr.
  92. *
  93. *  Register Usage:
  94. *     CC = reflects value stored.
  95. *     All other registers preserved.
  96. *
  97. *  NOTE:
  98. *    1. Instruction modified code here must be located in RAM!
  99. *
  100. .STA$Y    EQU    *
  101.           STA    0-0+$FFFF
  102. .YREG2$   EQU    *-2         Pseudo YREG #2
  103.           RTS
  104. *-- end of RAM subroutines ----------------------------------------------*
  105.  
  106. .RAMSZ$   EQU    *-.RAMSBR$   Size of ram subroutines (in bytes).
  107.    IFNE   RAMSZ$-.RAMSZ$
  108.           FAIL   Size mismatch between RAM/ROM subroutine areas!
  109.    ENDC
  110.